

// 用户ID
let id = getUrlParam("id");
$(function () {
    GetUserRole();
});
//获取用户权限
function GetUserRole() {
    // let thisdata = [];
    // thisdata.push(InitRole(id));
    let USERdata = InitRole(id);
    if (USERdata != null) {
    InitData();

    }
    else OpenErrmsg("../../web/errhtml/404.html");
}
function InitData() {
    //后台返回数据
    var data = [
        { "ID": "B01", "The_Date": "2021-09-08", "Rectify_Type": "隐患", "Rectify_Content": "整改内容", "Department": "生产部", "Rectify_By": "张丹", "Status": "完成" },
        { "ID": "B01", "The_Date": "2021-09-08", "Rectify_Type": "隐患", "Rectify_Content": "整改内容", "Department": "生产部", "Rectify_By": "张丹", "Status": "完成" },
        { "ID": "B01", "The_Date": "2021-09-08", "Rectify_Type": "隐患", "Rectify_Content": "整改内容", "Department": "生产部", "Rectify_By": "张丹", "Status": "完成" },
        { "ID": "B01", "The_Date": "2021-09-08", "Rectify_Type": "隐患", "Rectify_Content": "整改内容", "Department": "生产部", "Rectify_By": "张丹", "Status": "完成" },
        { "ID": "B01", "The_Date": "2021-09-08", "Rectify_Type": "隐患", "Rectify_Content": "整改内容", "Department": "生产部", "Rectify_By": "张丹", "Status": "完成" },
    ];
    //加载数据
    $('#dg_WorkPlanList').datagrid({
        data: data
    });
}
// function formaterPlanWork(value, row) {
//     let str = ' <label style="color:#589BD8">'+row.PlanWork+'</label><br />';
//      str += ' <label style="padding:10px">发起人&nbsp;&nbsp;&nbsp;   '+row.Creater+'</label>';
//      str += ' <label style="padding:10px">发起时间&nbsp;&nbsp;&nbsp;    '+row.CreateDate+'</label>';
//     return str;
// }
// function formaterIndex(value, row) {
//     return '<a href="#" style="color:#027DB4;text-decoration:none;margin-top: 20px;">处理</a>';
// }
